#ifndef io_ifile_c_h
#define io_ifile_c_h

#include "file/include/file.h"
#include "file_base_c.h"

using cmn::mem;
using cmn::byte;
using cmn::dword;
using cmn::kcstr;
using io::file;
using io::ifile;

class ifile_c : public ifile
{
public:
	virtual dword   release();

	virtual bool	open(kcstr _file_name);

	virtual bool	open(kcwstr _file_name);

	virtual void	close();

	virtual bool	seek(dword _offset, seek_dir _dir);

	virtual bool	is_open()	const;

	virtual dword	tell()		const;

	virtual dword	length()	const;

	virtual kcstr	name()		const;

	virtual dword	read(void* _mem, dword _size);

	virtual dword	length_readed() const;

private:
	file_base	m_file_impl;
	dword		m_length_readed = 0;
};

#endif
